<template>
  <view class="container">
    <!-- 顶部组件 -->
    <u-navbar
      id="nav-bar"
      :is-back="true"
      :background="{ background: 'transparent' }"
      :border-bottom="false"
      title="基本详情"
    ></u-navbar>
    <image class="bg" src="/static/images/bg.png" mode="widthFix"></image>
    <view class="content">
      <view class="header">
        <image class="header-bg" src="/static/images/bc-bg.png" mode="widthFix"></image>
        <view class="header-in">
          <image class="avatar" src="/static/images/logo.png" mode="widthFix"></image>
          <view class="info">
            <view class="name">上海汇付数据服务股份有限公司新疆…</view>
            <view class="account"
              ><text>商户号：1298381902381</text> <text class="status">正常</text></view
            >
          </view>
        </view>
      </view>
      <u-tabs
        :list="tabList"
        :is-scroll="false"
        bg-color="transparent"
        :current="tabCurrent"
        @change="changeTab"
      ></u-tabs>

      <view class="section">
        <view class="row">
          <view class="label">姓名</view>
          <view class="value">
            <text class="status ysm">已认证</text> <text>张三三</text>
          </view>
        </view>

        <view class="row">
          <view class="label">手机号</view>
          <view class="value">
            <text>188888888</text>
          </view>
        </view>

        <view class="row">
          <view class="label">机具号</view>
          <view class="value">
            <text>1278367******9812</text>
          </view>
        </view>

        <view class="row">
          <view class="label">结算信息</view>
          <view class="value">
            <text>190283098123092813</text>
          </view>
        </view>

        <view class="row">
          <view class="label">入网时间</view>
          <view class="value">
            <text>2024-04-01</text>
          </view>
        </view>

        <view class="row">
          <view class="label">人脸意愿核身状态</view>
          <view class="value">
            <text class="color-red">待认证</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {
      tabList: [
        {
          name: '基础信息',
          count: 0,
        },
        {
          name: '层级关系',
          count: 0,
        },
        {
          name: '费率信息',
          count: 0,
        },
        {
          name: '交易信息',
          count: 0,
        },
      ],
      tabCurrent: 0,
    };
  },
  onLoad() {},
  methods: {
    navigateTo(url) {
      uni.navigateTo({
        url: url,
      });
    },
    changeTab(index) {},
  },
};
</script>

<style lang="scss" scoped>
.container {
  width: 100%;
  min-height: 100vh;
  padding: 30rpx;
  text-align: center;
  background-color: #f5f5f5;
  .bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
  }
}

.content {
  position: relative;
  width: 100%;

  .header {
    position: relative;
    margin-bottom: 10rpx;
    width: 100%;
    height: auto;
    .header-bg {
      width: 100%;
      height: auto;
    }
    .header-in {
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      width: 100%;
      height: 100%;
      padding: 30rpx;
      background-color: transparent;
      .avatar {
        width: 120rpx;
        height: 120rpx;
        border-radius: 50%;
      }
      .info {
        flex: 1;
        min-width: 0;
        padding-left: 20rpx;
        text-align: left;
        .name {
          width: 100%;
          font-weight: bold;
          font-size: 28rpx;
          color: #ffeacc;
        }
        .account {
          display: flex;
          align-items: center;
          margin-top: 16rpx;
          width: 100%;
          font-weight: 400;
          font-size: 24rpx;
          color: rgba($color: #ffffff, $alpha: 0.5);
          .status {
            display: inline-block;
            margin-left: 20rpx;
            height: 28rpx;
            line-height: 28rpx;
            padding: 0 12rpx;
            font-weight: 400;
            font-size: 20rpx;
            color: #ffffff;
            background: linear-gradient(90deg, #d9b189, #c5a27f);
            border-radius: 4rpx;
          }
        }
      }
    }
  }
}

.section {
  margin-top: 20rpx;
  width: 100%;
  padding: 0 30rpx;
  background: #ffffff;
  border-radius: 20rpx;
  .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 40rpx 0;
    border-bottom: 1rpx solid #f0f0f0;
    .label {
      font-weight: bold;
      font-size: 28rpx;
      color: #333333;
      line-height: 1;
    }
    .value {
      display: flex;
      align-items: center;
      font-weight: 400;
      font-size: 28rpx;
      color: #333333;
      line-height: 1;
      .status {
        display: inline-block;
        margin-right: 10rpx;
        line-height: 1;
        padding: 4rpx 12rpx;
        font-weight: 400;
        font-size: 20rpx;
        color: #ffffff; border-radius: 4rpx;
      }
      .ysm {
        background: linear-gradient(90deg, #d9b189, #c5a27f);
      }
      .wsm {
        background: #CCCCCC;
      }
      .color-red {
        color: #f53131;
      }
    }
  }
}
</style>
